<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的订单</title>
    <link rel="stylesheet" href="/static/css/style.css">
    <script src="/static/script/jquery-1.7.2.js"></script>
    <script>
        $(function (){
            $("#return").click(function (){
                location = "/login";
            });
        });
    </script>
</head>
<body>

<div id="login_page">
    <div class="logo" style="color: #39987c;"><img alt="" src="{{.User.ImgPath}}" style="width: 50px;height: 50px;border-radius: 50px;border: 2px solid darkblue;">{{.User.Username}}</div>
    <div id="films">
        <div id="main">
            <table id="films_table">
                <thead>
                <tr id="first_th">
                    <th>订单号</th>
                    <th>时间</th>
                    <th>电影名称</th>
                    <th>单价</th>
                    <th>位数</th>
                    <th>座位</th>
                    <th>总金额</th>
                    <th colspan="2">状态</th>
                </tr>
                </thead>
                {{range .Orders}}
                <tr>
                    <td style="text-align: center;width: 50px">{{.OrderID}}</td>
                    <td style="text-align: center;width: 80px">{{.CreateTime}}</td>
                    <td style="text-align: center">{{.FilmName}}</td>
                    <td style="text-align: center">{{.Price}}</td>
                    <td style="text-align: center">{{.TotalCount}}</td>
                    <td style="text-align: center">
                        {{range .Seats}}
                        {{.Col}}行{{.Row}}列<br/>
                        {{end}}
                    </td>
                    <td style="text-align: center">{{.TotalAmount}}</td>
                    {{if .IsPay}}
                    <td style="width: 100px;color: green;">已支付</td>
                    {{end}}

                    {{if .IsLose}}
                    <td style="width: 100px;color: red;">已失效</td>
                    {{end}}
                    {{if .NoPay}}
                    <td style="width: 50px">未支付</td>
                    <td style="width: 50px" style="text-align: center"><a href="/toTicketPage?orderID={{.OrderID}}&seatIDs={{.GetSeatIDs}}&cols={{.GetCols}}&rows={{.GetRows}}" style="color: red">去支付</a></td>
                    {{end}}
                </tr>
                {{else}}
                <td colspan="8" style="text-align: center">
                    <div>
                        ┭┮﹏┭┮ ，空空如也，快去添加演出计划吧~
                    </div>
                </td>
                {{end}}
            </table>
        </div>
        <input type="button" value="返回" id="return">
    </div>
</div>
</body>
</html>
</body>
</html>